<template>
	<view>
		<view class='bankcard'  :style="{backgroundImage:cardbg}">
			<view class='cardtop'>
				<view class='banklogo'>
					{{bankcardbg}}
					<image :src="banklogo"></image>
				</view>
				<view class='bankinfo'>
					<view class='bankname'>{{bankname}}</view>
					<view class='cardtype'>{{cardtype}}</view>
				</view>
			</view>
			<view class='cardnum'>
				6225 **** **** 2678
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:["bankname","cardtype","banklogo","cardbg"],
		name: "bankcard",
		data() {
			return {

			};
		}
	}
</script>

<style lang="less">
	.bankcard {
		width: 686rpx;
		height: 260rpx;
		border-radius: 10rpx;
		margin: 0px auto;
		box-sizing: border-box;
		padding: 40rpx;
		position: relative;
		overflow: hidden;
		margin-top: 30rpx;
		background-size: 100% 100%;

		.cardtop {
			display: flex;

			.banklogo {
				width: 50rpx;
				height: 50rpx;
				padding: 10rpx;
				background-color: #fff;
				border-radius: 50%;

				image {
					width: 50rpx;
					height: 50rpx;
				}
			}

			.bankinfo {
				margin-left: 30rpx;

				.bankname {
					font-size: 40rpx;
					color: #fff;
				}

				.cardtype {
					font-size: 20rpx;
					color: #fff;
				}
			}
		}

		.cardnum {
			position: absolute;
			right: 30rpx;
			bottom: 30rpx;
			color: #fff;
			font-size: 30rpx;
		}

		.cardbgimg {
			position: absolute;
			top: -30rpx;
			right: -30rpx;

			image {
				width: 200rpx;
				height: 200rpx;
				opacity: 0.2;
			}

		}
	}
</style>
